Code Editing
'' Code-Editing'' is adding items/features into a Super Mario Flash and/or Super Mario Flash 2 level, which usually cannot be made directly from the Level Editor, by means of editing the Level Code manually in text form. Using Code-Editing, a user can for example add hidden sprites and tiles into their level, change Mario's physics, alter warps, and more. Code Editing in MSupera '.' Code Editing in Super Mario Flash 2 In Super Mario Flash 2, you can do a lot of different things with Code-Editing. 'Hidden Items' Tiles/sprites can be replaced with Code-Editing only tiles/sprites. You can for example swap a still Mushroom out of a ?-Block with a Text Box. Here are some simple steps on how to do this: *Step 1: Put the tile where you want your Code-Edit sprite. NOTE: you must know the ID of the tile. It is recommended to use a Text Box (ID = 67), as this is one of the least used tiles in levels. *Step 2: Copy your code, and paste it in Word, or, if using a Macintosh, TextEdit. *Step 3: Use Word's searchbar (ctrl + F) and look for the tile's ID you want to swap your Code-Edit sprite with. If you used a Text Box for example, look for the number 67. *Step 4: Replace the number with the Code-Edit sprite's ID (if using large quantities of the sprite, it is reccommended to use find-and-replace functionality). *Step 5: Copy your level code, paste it into Super Mario Flash 2, and there you go! Here is a list of Code-Edit sprites. An asterix * means it does not have a sprite coded for the level editor, and will cycle through several sprites before stabilizing as the Chain Ball sprite: 'Mario's Physics' :See also: Mario Physics in SMF2 By changing the 3rd number in a Super Mario Flash 2 level code, you can change Mario's physics. Why is this feature in the game? Pouetpu may have used this for testing purposes, or for Mario to change it's physics when it obtains a power-up and uses it. The default is always 0 upon creating a new level. 'Exceeding the Limit' In normal Super Mario Flash 2, there is a X & Y limit (9990X/y). But, it is possible to bypass this limit by Code-Editing. Follow these steps to learn how to do it. Note: you can do the steps only with either the X or Y axis, if you do both, the game will freeze upon level code input. *Step 1: Create a new level (blank level) and copy the level code. *Step 2: Paste the level code in a text editor program like Word or Notepad *Step 3: Duplicate the L1 & L2 Axis number and also the L1 & L2 part of the level code. Note: make sure you don't copy the '&' in the level code! *Step 4: Past in your new level code in the game and enjoy your large level! You can even repeat the above steps to get an even longer level! But be careful, as that level may exceed the character limit of the Level Portal, which is 200,000 characters. 'Hidden Music' By changing the second number in a Super Mario Flash 2 level code, you can change the music. *Changing the number to 18 will cause the level to have the Key-exit music. *Changing the number to any number apart from 1 to 18 will cause the level to have no music. The number can also have non-numeric characters, in which case there will also be no music and the music number will be displayed as "NaN" in the Level Editor. Warp Editing Within the level's code, all of the level's entrances and all of the level's exits have their own sections, making two sections of warp data. For both entrances and exits, each warp is represented by four values. Entrances Value 1 (Entrance Type) Because the only entrance types that cannot be placed directly via the level editor cause the level to soft-lock, altering this value has no practical applications. Value 2 (X Position) The value determines how far from the leftmost space in the level the entrance is, with 20 representing one full block to the right. This value can be altered to change where Mario enters the level with extreme precision; for example, adding 10 to this value in a pipe-based warp can cause Mario to appear to warp through a 1-block-wide pipe. Additionally, this allows entrances to be placed at the borders of the levels, where the editor does not allow warps to be directly placed. Value 3 (Y Position) The value determines how far from the uppermost space in the level the entrance is, with 20 representing one full block downwards. The practical applications of altering this value are the same as those of value 2, but on the vertical axis instead. Value 4 (Entrance Direction) Note: This table is incomplete for in the interest of simplicity. By changing this value to 2 in a no-animation entrance or a vertical pipe, The level maker may set Mario to face left instead of right, which makes levels or sections of levels where the player must go left better-looking and/or more intuitive. If this value is changed in a horizontal pipe, Mario will appear to walk backwards out of the pipe. Exits Value 1 (X Position) This value determines how far from the leftmost space in the level the exit is. Unlike with entrances, 1 full block to the right is represented by 1 instead of 20. While the level-loading system accepts exits with this value in decimal form and the exit's position is portrayed accurately in the level editor, the exit may not be accessed in-game. Exits may, however, be placed on the borders of a level in the same manner as an entrance and still function normally. Value 2 (Y Position) This value determines how far from the uppermost space in the level the exit is, with 1 full block downwards being represented by 1. The practical applications are the same as with value 1. Value 3 (Exit Type) Like with value 1 for entrances, there are no exit types that cannot be placed directly through the level editor, so altering this value has no practical application. Value 4 (Connected Entrance) The value of this number leads to the entrance whose number is 1 greater than this value. Value 4 + 1 = Entrance Number Altering this value only serves as a shortcut and cannot do anything that cannot be done directly via the level editor. Category:SMF1 Features Category:SMF2 Features Category:Code Editing